\section{std --- standard deviation}
\label{fn:std}
\index{std()}
\index{standard deviation}
\begin{rail}
StdDev : 'std' '(' ( Scalar | Matrix ) ')' ;
\end{rail}

\verb+std+ calculates the standard deviation of the elements in the
argument matrix.  If the argument is a row or column vector, then
the standard deviation of all elements is returned. Otherwise
\verb+std+ returns a row-matrix formed by taking the standard
deviation of the elements in each column.

$\Longrightarrow$ This is not an \RLaB\ built-in function.  This function
is normally loaded on start-up from the \verb+mst.r+ file in the
standard \verb+rlib+ directory. Use of the \verb+-r+ option, incorrectly 
setting the \verb+RLAB_LIB_DIR+ environmental variable, or modifying
\verb+std.r+ may make this function unavailable.

\paragraph{Example}
\index{example of std()}
\index{std()!example}
\begin{verbatim}
> rand("normal", 10.0, 2.0 );
> a = rand(1,100);
> mean(a)
     9.76
> std(a)
     2.04
> b = rand(1,10)
 b =
 matrix columns 1 thru 6
     8.35       7.86       5.48       7.05       12.3       10.3  

 matrix columns 7 thru 10
     13.1       6.73       11.4       7.18  
> mean(b)
     8.96
> std(b)
      2.6
\end{verbatim}

See also: Page~\pageref{fn:mean} \verb+mean()+.

\newpage



